import request from '@/utils/request'

// 手动选题
export function savePaper(params) {
  return request({
    url: '/publicExamPaper/savePaper',
    method: 'post',
    headers: {
      "Content-Type": "application/json;charset=UTF-8",
    },
    data: params
  })
}
//快速组卷提交
export function saveFastGroupPaper(params) {
  return request({
    url: '/publicExamPaper/fastGroupPaper',
    method: 'post',
    headers: {
      "Content-Type": "application/json;charset=UTF-8",
    },
    data: params
  })
}
//获取试卷列表
export function queryPaperAll(params) {
  return request({
    url: '/publicExamPaper/queryAll',
    method: 'post',
    headers: {
      "Content-Type": "application/json;charset=UTF-8",
    },
    data: params
  })
}
//获取待考试卷列表
export function queryWaitPaperAll(params) {
  return request({
    url: '/waitPaper/queryAll',
    method: 'post',
    headers: {
      "Content-Type": "application/json;charset=UTF-8",
    },
    data: params
  })
}


//获取待考试卷列表
export function queryPaperInfo(params) {
  return request({
    url: '/waitPaper/queryPaperInfo',
    method: 'get',
    params
  })
}

//开始考试
export function startExamPaper(params) {
  return request({
    url: '/previewPaper/savePreviewPaper',
    method: 'get',
    params
  })
}

//考试页面详情
export function fetchData(params) {
  return request({
    url: '/previewPaper/queryPaperInfo',
    method: 'post',
    headers: {
      "Content-Type": "application/json;charset=UTF-8",
    },
    data: params
  })
}

// 考试页面题目详情
export function queryQuInfo(params) {
  return request({
    url: '/previewPaper/queryQuInfo',
    method: 'get',
    params
  })
}


//考试页面打分
export function calculationScore(params) {
  return request({
    url: '/previewPaper/calculationScore',
    method: 'post',
    headers: {
      "Content-Type": "application/json;charset=UTF-8",
    },
    data: params
  })
}

//考试页面交卷
export function handPaper(params) {
  return request({
    url: '/examResult/handPaper',
    method: 'post',
    headers: {
      "Content-Type": "application/json;charset=UTF-8",
    },
    data: params
  })
}

// 考试结果
export function examResult(params) {
  return request({
    url: '/examResult/getExamResultInfoById',
    method: 'get',
    params
  })
}

// 考试结果列表
export function queryExamResultList(params) {
  return request({
    url: '/examResult/queryExamResultList',
    method: 'get',
    params
  })
}

//下发考试
export function saveWaitPaper(params) {
  return request({
    url: '/waitPaper/saveWaitPaper',
    method: 'post',
    headers: {
      "Content-Type": "application/json;charset=UTF-8",
    },
    data: params
  })
}

//删除试卷
export function delPaper(params) {
  return request({
    url: '/publicExamPaper/delPaper',
    method: 'get',
    params
  })
}
